import axios from "../plugins/axios";



const api  = {
    login: {
        login (data) {
            return axios.post('/root/login', data)
        },
    },
    user: {
        // 筛选
        search (data) {
            return axios.post('/user/queryAllUserList2', data)
        },
        getList (data) {
            return axios.post('/user/queryAllUserList2',data)
        },
        userDelete(data) {
            return axios.post('/user/delete/'+data.id, data)
        },
        userModify(data) {
            return axios.post('/user/edit', data)
        },
        userAdd(data) {
            return axios.post('/user/insert', data)
        }
    },
    sysCurrent: {
        search (data) {
            return axios.post('/sysCurrent/list', data)
        },
        getList (data) {
            return axios.post('/sysCurrent/list',data)
        },
        getDeviceInfo (data) {
            return axios.post('/sysCurrent/getDeviceInfo/'+data.id, data)
        }
    },
    sysWarring: {
        search (data) {
            return axios.post('/sysWarring/list', data)
        },
        getList (data) {
            return axios.post('/sysWarring/list',data)
        }
    }
}
export default api